﻿@model IEnumerable<GameSchoolWeb.Models.Course>
@{
    Layout = null;
}
<p>
    @if (User.IsInRole("Umsjonarmadur"))
    {
        @Html.ActionLink("Bæta við námskeiði", "CreateCourse", "Course")
    }
</p>
<table>
    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.ActionLink(item.strName, "Details", new { id = item.id })
            </td>
            @if (User.IsInRole("kennari"))
            {
                <td>
                    @Html.ActionLink("Breyta", "EditCourse", new { id = item.id })
                </td>
            }
        </tr>
    }
</table>
